package week3.day18;

/**
 * @Author fengzihao
 * @Date 2024-05-02 19:36
 */
public class ChangeTheCase {
    public static void main(String[] args) {
        String str = "legendary";
        char[] strs = str.toCharArray();
        for (int i = 0; i < strs.length; i++) {
            if (i%2==0)
                strs[i] = Character.toUpperCase(strs[i]);
        }
        String result = new String(strs);
        System.out.println("result = " + result);
    }
}
